package algorithmTopics.designPatterns.factoryPattern;

/**
 * 形状工厂
 *
 * @author 86155
 * @date 2025/07/20
 */
public class ShapeFactory extends AbstractFactory {

    /**
     * 获取形状
     *
     * @param shapeType 形状类型
     * @return {@link Shape}
     */
    @Override
    public Shape getShape(String shapeType) {
        if (shapeType.equalsIgnoreCase("RECTANGLE")) {
            return new Rectangle();
        } else if (shapeType.equalsIgnoreCase("SQUARE")) {
            return new Square();
        }
        return null;
    }

    @Override
    public Color getColor(String color) {
        return null;
    }
}
